package com.xxxx.seckill.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xxxx.seckill.pojo.User;
import com.xxxx.seckill.vo.LoginVo;
import com.xxxx.seckill.vo.RespBean;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * <p>
 * 用户表 服务类
 * </p>
 *
 * @author heyanfeng
 * @since 2022-07-29
 */
public interface IUserService extends IService<User> {

    /**
     * @Author heyanfeng
     * @Description // 登录
     * @Date 11:03 2022/8/1
     * @Param [loginVo, request, response]
     * @return com.xxxx.seckill.vo.RespBean
     **/
    RespBean doLogin(LoginVo loginVo, HttpServletRequest request, HttpServletResponse response);

    /**
     * @Author heyanfeng
     * @Description //  根据cookie获取用户
     * @Date 11:59 2022/8/1
     * @Param [userTicket]
     * @return com.xxxx.seckill.pojo.User
     **/
    User getUserByCookie(String userTicket, HttpServletRequest request, HttpServletResponse response);


    /**
     * @Author heyanfeng
     * @Description // 更新用户
     * @Date 15:52 2022/8/23
     * @Param [userTicket, id, password]
     * @return com.xxxx.seckill.vo.RespBean
     **/
    RespBean updatePassword(String userTicket,String password,HttpServletRequest request, HttpServletResponse response);
}
